package com.atguigu.gmall.web.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author atguigu-mqx
 * @Description TODO
 * @Date 2023/8/30 9:21
 * @Version 1.0
 */
@Controller
public class PassportController {

    //  http://passport.gmall.com/login.html?originUrl=http://list.gmall.com/index.html

    /**
     * 登录页面展示
     * @param request
     * @return
     */
    @GetMapping("login.html")
    public String login(HttpServletRequest request){
        //  存储数据
        request.setAttribute("originUrl",request.getParameter("originUrl"));
        //  返回登录页面
        return "login";
    }
}
